/**
 * Copyright(c) 2010 Ceno Techonologies Co., Ltd.
 *
 * History:
 *   15-8-25 下午2:14 Created by lyyang
 */
package com.jade.bss.base.logger;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

import com.jade.journal.JournalEntity;

/**
 * 控制器logger
 *
 * @author <a href="mailto:lyyang@ceno.cn">lyyang</a>
 * @version 1.0 15-8-25 下午2:14
 */
@Entity
@Table (name = "BSS_CONTROLLER_LOG")
public class ControllerLogger extends JournalEntity
{
    public static final String JOURNAL_NAME = "controller_journal_log";
    public static final int RESULT_SUCCESS = 0;
    public static final int RESULT_FAIL = 1;

    @Id
    @GeneratedValue (generator = "SEQ_BSS_CONTROLLER_LOG")
    @SequenceGenerator (name = "SEQ_BSS_CONTROLLER_LOG", sequenceName = "SEQ_BSS_CONTROLLER_LOG")
    private long id;

    @Column(name="creation_time")
    private Date creationTime;

    @Column(name="operator_id")
    private long operatorId;

    @Column(name="operator_type")
    private String operatorType;

    private String ip;

    private String operator;

    @Column(length = 1000)
    private String action;
    @Column(length = 3000)
    private String params;

    private int result;

    public long getId()
    {
        return id;
    }

    public String getOperatorType()
    {
        return operatorType;
    }

    public void setOperatorType(String operatorType)
    {
        this.operatorType = operatorType;
    }

    public String getIp()
    {
        return ip;
    }

    public void setIp(String ip)
    {
        this.ip = ip;
    }

    public void setId(long id)
    {
        this.id = id;
    }

    public Date getCreationTime()
    {
        return creationTime;
    }

    public void setCreationTime(Date creationTime)
    {
        this.creationTime = creationTime;
    }

    public long getOperatorId()
    {
        return operatorId;
    }

    public void setOperatorId(long operatorId)
    {
        this.operatorId = operatorId;
    }

    public String getOperator()
    {
        return operator;
    }

    public void setOperator(String operator)
    {
        this.operator = operator;
    }

    public String getAction()
    {
        return action;
    }

    public void setAction(String action)
    {
        this.action = action;
    }

    public String getParams()
    {
        return params;
    }

    public void setParams(String params)
    {
        this.params = params;
    }

    public int getResult()
    {
        return result;
    }

    public void setResult(int result)
    {
        this.result = result;
    }

    public ControllerLogger(){
        super(JOURNAL_NAME);
    }
}
